using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics;

namespace Autorun
{
	// This class has been written by Vagif Abilov
	// and published through a sample available at http://www.codeproject.com/KB/dotnet/customnettracelisteners.aspx
	public class TextWriterTraceListenerWithTime : TextWriterTraceListener
	{
		public TextWriterTraceListenerWithTime()
			: base()
		{
		}

		public TextWriterTraceListenerWithTime(Stream stream)
			: base(stream)
		{
		}

		public TextWriterTraceListenerWithTime(string path)
			: base(path)
		{
		}

		public TextWriterTraceListenerWithTime(TextWriter writer)
			: base(writer)
		{
		}

		public TextWriterTraceListenerWithTime(Stream stream, string name)
			: base(stream, name)
		{
		}

		public TextWriterTraceListenerWithTime(string path, string name)
			: base(path, name)
		{
		}

		public TextWriterTraceListenerWithTime(TextWriter writer, string name)
			: base(writer, name)
		{
		}

		public override void WriteLine(string message)
		{
			base.Write(DateTime.Now.ToString("dd/MM/yyyy-HH:mm:ss"));
			base.Write(" ");
			base.WriteLine(message);
		}
	}
}
